package com.aierjun.notepadjun;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabWidget;

/**
 * Created by aierJun on 2016/6/26.
 */
public class FenYeAcitivity extends Activity {
    private TabHost tabHost;
    private TabWidget tabWidget;

    private static final String TAB_TAG_1="one";
    private static final String TAB_TAG_2="two";
    private static final String TAB_TAG_3="three";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fenye);
        findView();
    }
    protected void findView(){
        tabHost= (TabHost) findViewById(android.R.id.tabhost);
        tabHost.setup();
        tabWidget=tabHost.getTabWidget();
        tabHost.addTab(tabHost.newTabSpec(TAB_TAG_1).setContent(R.id.v1).setIndicator("记录"));
        tabHost.addTab(tabHost.newTabSpec(TAB_TAG_2).setContent(R.id.v2).setIndicator("新建"));
        tabHost.addTab(tabHost.newTabSpec(TAB_TAG_3).setContent(R.id.v3).setIndicator("修改"));
    }
}
